<template>
  <div style="" class="back_box">
    <el-form
      ref="form"
      :model="form"
    >
      <h4 class="notice_title"> {{ form.name }}</h4>
      <small class="creteTime grey">{{ form.createTime }}</small>
      <div class="notice_content" v-html="form.content" />
    </el-form>
  </div>
</template>
<script>
// import adminSupport from 'lola-admin-support-el'
import cms from '@/api/cms'
export default {
  name: 'NoticeListEdit',
  // mixins: [adminSupport.mixins.edit],
  data() {
    return {
      name: 'NoticeList',
      form: {}
    }
  },
  mounted() {
    // this.page.tip = ''
    this.init() // 初始化
  },
  methods: {
    async init() {
      const that = this
      // that.page.ids.push(this.$route.params.no) // 页面主参数赋值
      // that.loadData() // 加载数据
      const result = await cms.noticeDetail(this.$route.params.no)
      if (result.code === 200) { that.form = result.data }
    },
    appendForm() {
      // const roleIds = []
      // if (this.form.roles != null) {
      //   this.form.roles.forEach(item => {
      //     roleIds.push(item.id)
      //   })
      // }
      // this.form.roleIds = roleIds
    },
    buildForm() {
      return true
    }
  }
}
</script>
<style scoped>
.back_box{
  width:100%;min-height:680px;background:white;
  padding: 10px;
}
 .notice_title{padding: 10px 20px;text-align: center;}
 .creteTime{text-align: right;padding: 10px 20px;float:right;}
 .notice_content{
   padding: 10px 20px;
 }
</style>
